from pymysql import Connection

# 创建数据库连接
conn = Connection(
    host="localhost",
    port=3306,
    user="root",
    passwd="Gqyj158569.#",
    autocommit=True     #开启自动提交，就不需要 conn.commit()
)

cursor = conn.cursor()

conn.select_db("sun_mall")

cursor.execute("inset into user values (1,'asd','123123')")

# conn.commit()

conn.close()